﻿using System.Web.Mvc;
using System.Web.Routing;

namespace TjZheng.Example.MVC.Areas.WebForm
{
    public class WebFormAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "WebForm";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            //RouteTable.Routes.MapPageRoute("WebForm.aspx", "webform/{name}/{action}.aspx", "~/Areas/WebForm/Views/{name}/{action}.aspx");
            //RouteTable.Routes.MapPageRoute("WebForm", "webform/{name}/{action}", "~/Areas/WebForm/Views/{name}/{action}.aspx");
            context.MapRoute(
                "WebForm_default",
                "WebForm/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
